<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>查询赛事信息</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <!--<link rel="stylesheet" type="text/css" href="/plugins/bootstrap/css/bootstrap.css">-->
    <!--<link rel="stylesheet" href="//cdn.bootcss.com/zui/1.8.1/css/zui.min.css">-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin layui-bg-blue">
    <!-- 头部区域 -->
    <div th:replace="index::topbar"></div>

    <!-- 左侧导航区域 -->
    <div th:replace="index::sidebar"></div>

    <!-- 底部固定区域 -->
    <div th:replace="index::bottombar"></div>

    <!-- 内容主体区域 -->
    <div class="layui-body">

        <div class="layui-tab layui-tab-brief" lay-filter="condition">
            <label class="layui-form-label" style="font-size: large">查询条件</label>
            <ul class="layui-tab-title">
                <li>根据id查询</li>
                <li class="layui-this">根据联赛名称查询</li>
                <li>根据联赛简称查询</li>
                <li>根据开始日期查询</li>
                <li>根据主办方查询</li>
                <li>多条件查询</li>
            </ul>
            <div class="layui-tab-content">
                <!-- 根据id查询 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueById}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="league_id" id="league_id" required  lay-verify="required" placeholder="请输入联赛id" autocomplete="off" class="layui-input">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                    </div>
                </div>
                <!-- 根据联赛名称查询 -->
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueByName}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="leagueName" id="leagueName" required  lay-verify="required" placeholder="请输入联赛名称" autocomplete="off" class="layui-input">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                        <!--<a href="#" th:href="@{showLeague}"><button style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button></a>-->
                    </div>
                    <!--<a href="/upload/images/94/ff5da35d661e4266b8659882467c7a96.jpeg">皮皮皮皮鹏</a>-->
                </div>
                <!-- 根据联赛简称查询 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueByShorterName}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="shorterName" id="shorterName" required  lay-verify="required" placeholder="请输入联赛简称" autocomplete="off" class="layui-input">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                    </div>
                </div>
                <!-- 根据开始日期查询 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueByDate}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" class="layui-input" name="startDate" id="startDate" placeholder="请选择开始时间">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                    </div>
                </div>
                <!-- 根据主办方查询 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueBySponsor}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="sponsor" id="sponsor" required  lay-verify="required" placeholder="请输入主办方" autocomplete="off" class="layui-input">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                    </div>
                </div>

                <!-- 多条件复杂查询 -->
                <div class="layui-tab-item">
                    <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                        <form th:action="@{/showLeagueByComplex}" method="post">
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="leagueName" required  lay-verify="required" placeholder="请输入联赛名称" autocomplete="off" class="layui-input">
                                <br><br>
                            </div>
                            <div class="layui-input-block" style="width: 35%;display: inline-block">
                                <input type="text" name="startDate" id="StartTime" required  lay-verify="required" placeholder="请选择开始日期" autocomplete="off" class="layui-input">
                            </div>
                            <button type="submit" style="display: inline-block" class="layui-btn layui-btn-normal">搜索</button>
                        </form>
                    </div>

                    <!--<div class="layui-form-item" style="margin: 100px auto;width: 800px">
                            <label class="layui-form-label">赛事全称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="leagueName" required lay-verify="required" placeholder="请输入联赛全称" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                            <label class="layui-form-label">开始时间</label>
                            <div class="layui-inline">
                                <input type="text" name="startDate" class="layui-input" id="StartTime" placeholder="请选择开始时间">
                            </div>
                        </div>
                        <div class="layui-form-item" style="margin: 100px auto;width: 800px">
                            <button type="submit" class="layui-btn layui-btn-normal">搜索</button>
                        </div>-->
                </div>
            </div>
        </div>
    </div>
</div>

</body>

<script src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<!--<script src="/plugins/bootstrap/js/bootstrap.js"></script>-->
<!--<script src="//cdn.bootcss.com/zui/1.8.1/js/zui.min.js"></script>-->

<!-- 修改密码弹窗 -->
<script type="text/html" id="pswModel1">
    <div id="pswModel" th:replace="index::changePsw">
    </div>
</script>

<script>
    layui.use('form', function(){
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });


    /*时间选择器*/
    layui.use('laydate', function(){
        var starttime = layui.laydate;
        var starttime_=layui.laydate;
        //执行一个laydate实例
        starttime.render({
            elem:'#startDate'
            ,theme:'#1E9FFF'
        });
        starttime_.render({
            elem:'#StartTime'
            ,theme:'#1E9FFF'
        })
    });

    layui.use('element', function(){
        var element = layui.element;

        //一些事件监听
        element.on('tab(condition)', function(data){
            console.log(data);
        });
    });

    //侧边导航栏展开并选中查询赛事信息选项
    $("#leagueManage").addClass("layui-nav-itemed");
    $("#queryLeague").addClass("layui-this");

    //显示个人信息
    function info() {
        layui.use(['layer'], function(){
            var layer = layui.layer;
            layer.open({
                type:1,
                title:'个人信息',
                area:'350px',
                offset:'120px',
                content:'<ul style="padding:25px 35px 8px 35px;">' +
                '<li>用户名：[[${session.loginUser}]]</li>'+
                '<li>手机号：13657936306</li>'+
                '</ul>',
                btn:['确定'],
                btnAlign:'center'
            });
        });
    }

    //修改密码
    function changePassword() {
        layui.use(['layer'],function () {
            var layer=layui.layer;
            layer.open({
                type: 1,
                title: "修改密码",
                area: '400px',
                offset: '120px',
                content: $("#pswModel1").html()
            });
        })
    }

</script>
</html>
